﻿<%@ Page Language="C#" MasterPageFile="Site.master" AutoEventWireup="true" CodeBehind="index.aspx.cs" 
Inherits="GeniusWebApplication.index" %>

<asp:Content ID="_css_place" ContentPlaceHolderID="css_place" runat="server">
    <link href="./css/index.css" rel="stylesheet" type="text/css">
</asp:Content>

<asp:Content ID="_upload" ContentPlaceHolderID="upload" runat="server">
    <a href="./upload.aspx"><img id="shang" src="./img/btn_go.png"/></a>
</asp:Content>
	
<asp:Content ID="_library" ContentPlaceHolderID="library" runat="server" >
	
    <span id="libraryList" runat="server">
    </span>
    <script>
        var haveF = new Array();
        function overZui(l) {
            var a = document.getElementById("zuixinSelected");
            var length_l = getElementLeft(l) - 29;
            a.style.left = length_l + "px";
        }
        function clickNav(l) {
            var a = document.getElementById("zuixinSelected0");
            var length_l = getElementLeft(l) - 29;
            a.style.left = length_l + "px";

        }
       
        
	</script>
</asp:Content>

<asp:Content ID="_you_shang_jiao" ContentPlaceHolderID="you_shang_jiao" runat="server" >
	<input type="search" placeholder="搜索资源"  results="8" id="searchBox" name="searchBox">
    <select id="searchType">
        <option value="0">普通搜索</option>
        <option value="1">高级搜索</option>
    </select>
	<span class="headerItem"><a href="#" onclick="searchResource();">搜索</a></span>
	<span class="headerItem" id="message_notice">消息</span>
	<span class="headerItem"><a href="./log.aspx">退出</a></span>
</asp:Content>

<asp:Content ID="_float_left" ContentPlaceHolderID="float_left" runat="server" >
    <section id="myList">
		<ul id="myListUl" runat="server">
		</ul>
        <script>
            function clickFab(l) {

                var can = 1;
                var rid = parseInt(l.id);
                
                if(haveF.length==0){
                    can = 1;
                    haveF[0] = rid;
                }
                else{
                    for (var i = 0; i < haveF.length; i++) {
                        if (rid == haveF[i]) {
                            can = 0;
                            haveF[i] = rid+20;
                        }
                    }
                }
                if (can==1) {

                    
                    haveF[haveF.length-1] = rid;

                    $.ajax({
                        type: "POST",
                        url: "index.aspx/ajaxSaveFab",
                        data: "{resourceId:'" + rid + "'}",
                        contentType: "application/json; charset=utf-8",
                        success: function (data) {
                            var info = eval("(" + data.d + ")");
                            var suc = info.result;
                            var msg = info.message;
                            if (suc == 1) {

                                l.src = "./img/opt_fab.png";
                                alert("收藏成功！");
                            } else {
                                alert(msg);
                                l.src = "./img/opt_star.png";
                            }
                        }
                    });
                }
                else {
                    $.ajax({
                        type: "POST",
                        url: "index.aspx/ajaxDelFab",
                        data: "{resourceId:'" + rid + "'}",
                        contentType: "application/json; charset=utf-8",
                        success: function (data) {
                            var info = eval("(" + data.d + ")");
                            var suc = info.result;
                            var msg = info.message;
                            if (suc == 1) {

                                l.src = "./img/opt_star.png";
                                alert("取消收藏！");
                            } else {
                                alert(msg);
                            }
                        }
                    });
                }
            }
        </script>
	</section>
</asp:Content>

<asp:Content ID="_float_right" ContentPlaceHolderID="float_right" runat="server" >
    <div id="keywords">
		<div id="guanjian">标签</div>
		<div id="keys" runat="server">
			
		</div>
	</div>
	<div id="stopFlow"></div>
		
	<div id="order" runat="server" >
		<div id="oder">最新上传</div>
	</div>
</asp:Content>
